import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
  state:{
    username:''
  },
  getters:{
    username(state){
      return localStorage.getItem('username')
    }
  },
  actions:{},
  mutations:{
    setUserName(state,username){
      state.username = username
      localStorage.setItem('username',username) 
    }
  }
})